home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gigarom 1
/
Gigarom Macintosh Archives (Quantum Leap)(CDRM1080320)(1993).iso
/
FILES
/
APP
/
S-Z
/
TimeBook2.0.sit
/
TimeBook 2.0
/
stack_-1.xml
< prev
next >
Wrap
Extensible Markup Language
|
1993-03-22
|
17KB
|
35 lines
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE stack PUBLIC "-//Apple, Inc.//DTD stack V 2.0//EN" "" >
<stack>
<name>in.0</name>
<id>-1</id>
<cardCount>12</cardCount>
<cardID>11436</cardID>
<listID>8058</listID>
<cantModify><false /></cantModify>
<cantDelete><true /></cantDelete>
<cantAbort><false /></cantAbort>
<cardSize>
<width>512</width>
<height>264</height>
</cardSize>
<script>-- STACKS: TimeBook, TimeClock, TimeFile-- VERSION:2.0-- ©Copyright 1993 Ronald Ladouceur, All Rights Reserved.-- DESCRIPTION: TimeBook - a fully functional time sheet and time tracking system.-- REQUIREMENTS: HyperCard 2.1 or HyperCard Player-- TimeBook uses XFCNs created in CompileIt! 2.1 ©Copyright 1992 by Heizer Software.-- The source HyperTalk scripts used to create these XFCNs and XCMDs are at the end-- of the background script of the TimeClock stack.-- TimeBook’s TimeClock stack uses an XFCN called popUpMenu() XFCN ©Copyright 1991-- by BungDabba Productions, All Rights Reserved. A popup menu XFCN which-- allows you to specify font and size.-- GLOBALS: commentsOn, autoUpdate, proMenus, punchLockOut,-- clientNumerals, jobNumerals, versionNumber, saveLockOut, holdDayList,-- optionStart, daysEnd, alreadyKnow, lastClickon openStackif wrongStack() then pass openStackglobal jobNumerals,clientNumerals,versionNumber,punchLockOut,saveLockOut,proMenus,autoUpdate,commentsOnif the version < 2.1 thenanswer "You must run HyperCard 2.1 or later to use TimeBook."doMenu "Quit HyperCard"end ifput false into punchLockOutput true into saveLockOutput word 2 of the short name of this stack into versionNumberstart using stack ("TimeClock" && versionNumber)if there is a bg btn "Splash" then send mouseUp to bg btn "Splash"lock screenif commentsOn is empty or autoUpdate is empty or proMenus is empty thengo to cd id 5964put the highLight of bg btn "Comments" into commentsOnput the highLight of bg btn "Auto Update" into autoUpdateput the highLight of bg btn "Pro Menus" into proMenusend ifif there is no menu "TimeBook" then logicMenusif jobNumerals is empty or clientNumerals is empty thengo bg id 3068put bg fld id 5 into jobNumeralsput bg fld id 6 into clientNumeralsend ifgo bg "dayRecorder"go cd "Time Book" && the short dateif the result is not empty thennewDayStuffend ifend openStackon resumeStackif wrongStack() then pass resumeStackopenStackend resumeStackon resumeif wrongStack() then pass resumeopenStackend resumeon newDayStuffglobal punchLockOut,alreadyKnow,daysEnd,versionNumberlock screenput guessMonday(the long date) into thisMondaygo bg "dayRecorder"answer "Welcome to a new week." & return & return &¬"To erase last week’s Time Book click 'New Week'." &&¬"To recalculate and/or print last week’s time" &&¬"sheet click 'Last Week' - then choose 'Reset' from the TimeBook menu " &¬"when you’re ready to start a new week." with "New Week" or "Last Week"if it is "Last Week" thenput true into punchLockOutput "IKnow" into alreadyKnowput empty into daysEndgo to bg id 7188put fld id 3 into theLastMonput guessMonday (theLastMon) into fld "Week"exit to hyperCardend ifput thisMonday into fld "Week"lock messagespush cdgo stack "TimeClock" && versionNumberput thisMonday into fld "weekHolder"put the long date into fld "dateHolder"put empty into fld "JobInfo"put emtpy into fld "prevEndTime"pop cdunlock messagesstartANewTimeSheet thisMondayclearCommentspush cdclearTimeSheetpop cddoMenu "Compact Stack"hide fld "HiddenFieldBlock"put false into punchLockOutput empty into alreadyKnowput empty into daysEndend newDayStuffon startANewTimeSheet whatMondayset the cursor to watchunlock screenput "Organizing TimeBook for a new week. Please stand by." into line 2 of fld "HiddenFieldBlock"show fld "HiddenFieldBlock"lock screennewWeekNamesmakeNewWeek whatMondaygo bg "DayRecorder"put (fld "Week" of cd 1 of bg "DayRecorder") into fld "TimeSheetWeek" of cd 1 of bg "TimeSheet"hide fld "HiddenFieldBlock"end startANewTimeSheeton newWeekNamesask "Please enter your Name" with (fld "EmpNamePref" of cd id 5964)if the result is "Cancel" thenanswer "TimeBook will enter ‘Your Name’ into the time sheet name, to enter your name, select ‘Reset’ from the menu."put "Your Name" into initialHoldelseput it into initialHoldend ifask "Please enter your employee number" with (fld "EmpNumberPref" of cd id 5964)if the result is "Cancel" thenanswer "TimeBook will enter ‘00’ into the time sheet number, to enter your employee number, select ‘Reset’ from the menu."put "00" into employeeHoldelseput it into employeeHoldend ifput initialHold && employeeHold into fld "empNameNumb"put initialHold && employeeHold into fld "TimeSheetName" of cd 1 of bg "TimeSheet"end newWeekNameson makeNewWeek aMondaylock messagesrepeat with x = 1 to 7go cd x of bg "dayRecorder"put empty into fld "recorderBookList"put empty into fld "totalTime"put empty into fld "totalCompareTime"put empty into fld id 69put empty into fld id 70put empty into fld id 71put empty into fld id 72put empty into fld id 35put aMonday into fld "day"convert aMonday to short dateset the name of this cd to "Time Book" && aMondayconvert aMonday to secsadd (60*60*24) to aMondayconvert aMonday to long dateend repeatunlock messagesend makeNewWeekon clearCommentsglobal versionNumberanswer "Erase last week’s comment list?" with "Erase" or "No"if it is "Erase" thenlock messagespush cdgo to bg id 7188put empty into fld "LogicComments"go stack "TimeClock" && versionNumberput empty into fld "Comments"pop cdunlock messagesend ifend clearCommentsfunction wrongStackget the value of word 2 of the long name of mereturn (it is not line 1 of the stacks)end wrongStack-- on resetMeglobal versionNumberif "TimeBook" is not in the short name of this stack then go to stack "TimeBook" && versionNumbergo bg "dayRecorder"answer "Do you want to reset TimeBook or just fix a TimeBook problem?" with "Cancel" or "Reset" or "Fix It"if it is "Reset" thenanswer "WARNING: resetting TimeBook erases all time sheet information (It won’t erase your TimeFile stack)." with "Reset" or "Cancel"if it is "Reset" thenlock screenresetLogicTimecleanUpelsepop cardexit resetMeend ifelseif it is "Fix It" thenlock screencleanUpend ifend ifgoLogicunlock screenend resetMeon cleanUpglobal versionNumber,proMenuslock messagesput word 2 of the short name of this stack into versionNumberset cursor to watchpush cdif "TimeBook" is not in the short name of this stack then go stack "TimeBook" && versionNumbergo bg "dayRecorder"go cd "Time Book" && the short dateif the result is empty then put item 2 of the last line of fld "recorderBookList" into lastEndTimehide fld "hiddenFieldBlock"go to bg id 7841if the visible of fld "Comments" then send mouseUp to bg btn id 92if the visible of fld id 90 then send mouseUp to bg btn id 91hide fld "hiddenTimeField"go to cd id 5964put the highLight of bg btn "Pro Menus" into proMenusgo to stack "TimeClock" && versionNumberput lastEndTime into fld "PrevEndTime"set highlight of bg btn id 27 to falsehide fld "TasksField"hide fld "ClientField"hide cd fld "hideFld"repeat with x = 13 to 15set the highlight of bg btn id x to falseend repeatunlock messagespop cdunlogicMenuslogicMenusend cleanUpon resetLogicTimeglobal alreadyKnow,versionNumberset cursor to watchput word 2 of the short name of this stack into versionNumberif "TimeBook" is not in the short name of this stack then go to stack "TimeBook" && versionNumbergo bg "dayRecorder"put empty into fld "week"newDayStuffend resetLogicTimeon checkWeekListcheckList (the id of fld "recorderBookList")put fld "recorderBookList" into weekListCheckerput empty into nonBilledTotalget the number of lines of weekListCheckerrepeat with x = 1 to (it - 1)put item 2 of line x of weekListChecker into anEndTimeconvert anEndTime to secsput item 1 of line (x + 1) of weekListChecker into aStartTimeconvert aStartTime to secsif anEndTime > aStartTime thenanswer "You have a Start/End error between lines" && x && "and" && (x + 1) && "on " & item 1 of fld "day" & ". Please correct it before recalculating your time sheet."if it is "OK" thenset hilite of bg button "PunchClock3" to falseexit checkWeekListend ifend ifput (aStartTime - anEndTime) into nonBilledif nonBilled > 60 thenadd nonBilled to nonBilledTotalif (the highlight of bg button id 14 of cd id 5964) is true thenanswer "You have a time gap in excess of 1 minute between lines" && x && "and" && (x + 1) && "on " & item 1 of fld "day" & ". Please correct it before recalculating your time sheet."if it is "OK" thenset hilite of bg button "PunchClock3" to falseexit checkWeekListend ifend ifend ifend repeatif (the highlight of bg button id 14 of cd id 5964) is false thendivide nonBilledTotal by 60put nonBilledTotal into fld "NonBilledTotal"end ifend checkWeekListon compareJobslock messagesgo to bg "DayRecorder"repeat with x = 1 to 7go to cd x of bg "DayRecorder"put fld "totalTime" into totalTimeHolderput (the number of lines of totalTimeHolder) into lineNumberput compareExtTest(totalTimeHolder,lineNumber) into fld "totalCompareTime" of cd x of bg "DayRecorder"end repeatend compareJobson clearTimeSheetlock messagesgo to bg "TimeSheet"set the cursor to watchput (the number of cds of this bg) into clearCardrepeat with z = 1 to (clearCard - 1)go to cd z of bg "TimeSheet"doMenu "Delete Card"end repeatgo to bg "TimeSheet"put empty into fld "jobNumber"put empty into fld "billingCat"put empty into fld "Total"repeat with x = 1 to 7put whataDay(x) into dayFieldput dayField into fieldNameput dayField & "Hours" into fieldName2put dayField & "BillHours" into fieldName3if (the highlight of bg button id 14 of cd id 5964) is false thenput dayField & "Gap" into fieldName4put empty into fld fieldName4end ifput empty into fld fieldNameput empty into fld fieldName2put empty into fld fieldName3end repeatput empty into fld "OverTime"put empty into fld "totalHours"put empty into fld "totalBillHours"put empty into fld "TotalOverHours"unlock messagesend clearTimeSheetfunction makeMyDay whichSheet,whatCard,otQuestif whichSheet is empty then exit makeMyDayrepeat with y = 1 to (the number of lines of whichSheet)if the last char of line y of whichSheet is not ")" then put ",(C*)" after the last char of line y of whichSheetput ",0,0,0,0,0,0,0,0" after line y of whichSheetif otQuest is "noOT" thenput (item 1 of line y of whichSheet) into item (dayToNum(whatCard) + 4) of line y of whichSheetelseput (item 1 of line y of whichSheet) into item 12 of line y of whichSheetend ifend repeatreturn whichSheetend makeMyDayon commandKeyDown whichKeyglobal punchLockOutif wrongStack() thenpass commandKeyDownexit commandKeyDownend ifif whichKey is "p" and word 1 of the short name of this stack is "TimeBook" thenunlock screengo to bg "TimeSheet"send mouseUp to bg btn id 60exit commandKeyDownend ifif whichKey is "r" and punchLockOut is true thenanswer "You must reset your time sheet before exiting TimeBook."exit commandKeyDownend ifpass commandKeyDownend commandKeyDownfunction sortRight whatFldput whatFld into sorterrepeat with x = 1 to the number of lines of sorterif line x of sorter is not empty thenconvert item 1 of line x of sorter to secsconvert item 2 of line x of sorter to secsend ifend repeatsort sorterrepeat with y = 1 to the number of lines of sorterif line y of sorter is not empty thenconvert item 1 of line y of sorter to short timeconvert item 2 of line y of sorter to short timeend ifend repeatreturn sorterend sortRighton doMenu whichMenuglobal versionNumberif "TimeBook"is not in the short name of this stack and "TimeClock"is not in the short name of this stack ¬and "TimeFile" is not char 1 to 8 of the short name of this stack then pass doMenuif whichMenu is "About HyperCard..." thenput the visible of msg into msgVisif there is a window "ShareSplash" thenmouseUpInPicture "ShareSplash"elsehide msgpicture "ShareSplash",resource,rect,true,8set the visible of msg to msgVisend ifexit doMenuend ifif whichMenu is "Print Report..." and the commandKey is not down thenset cursor to watchlock screengo stack "TimeBook" && versionNumbergo bg id 7841unlock screensend mouseUp to bg btn id 60exit doMenuend ifpass doMenuend doMenuon checkDayList checkWhatglobal versionNumberput checkWhat into dayListCheckerget the number of lines of dayListCheckerlock screenrepeat with x = 1 to (it)put item 2 of line x of dayListChecker into anEndTimeconvert anEndTime to secsput item 1 of line (x) of checkWhat into aStartTimeconvert aStartTime to secsif anEndTime < aStartTime thenanswer "The start time is later than the end time on line" && x && "of the time card. You must rectify it before continuing."set hilite of bg button "PunchClock3" to falseupdateFldsexit to hyperCardend ifput item 1 of line (x + 1) of checkWhat into aStartTimeconvert aStartTime to secsif x ≠ the number of lines of checkWhat thenif anEndTime > aStartTime thenanswer "You must rectify times between lines" && x && "and" && (x + 1) && "before continuing."if it is "OK" thenset hilite of bg button "PunchClock3" to falsepush cdlock messagesgo to stack "TimeClock" && versionNumberput empty into fld "JobInfo"pop cdupdateFldsexit to hyperCardend ifend ifend ifif (the highlight of bg button id 14 of cd id 5964) is true thenif (aStartTime - anEndTime) > 60 thenanswer "You have a time gap in excess of 1 minute between lines" && x && "and" && (x + 1) && "of your time card. You must rectify it before continuing."if it is "OK" thenset hilite of bg button "PunchClock3" to falsepush cdlock messagesgo to stack "TimeClock" && versionNumberput empty into fld "JobInfo"pop cdupdateFldsexit to hyperCardend ifend ifend ifend repeatend checkDayListon updateFldslock screenput fld id 2 into theItemsrepeat with x = 1 to the number of lines of theItemsput item 1 of line x of theItems & return after startTimesput item 2 of line x of theItems & return after stopTimesput item 3 of line x of theItems & return after jobsput item 4 of line x of theItems & return after categoriesend repeatif startTimes is not "startTimes" thenput startTimes into fld id 70put stopTimes into fld id 71put jobs into fld id 69put categories into fld id 72showComments (fld id 2)elseput empty into fld id 70put empty into fld id 71put empty into fld id 69put empty into fld id 72showComments (fld id 2)end ifend updateFldson closeStackif wrongStack() then pass closeStackglobal versionNumberif "TimeClock" is not in the stacksInUse then start using stack "TimeClock" && versionNumberlock screenunlogicMenusif "TimeBook" is in the stacksInUse then stop using stack "TimeBook" && versionNumberif "TimeClock" is in the stacksInUse then stop using stack "TimeClock" && versionNumberunlock screenend closeStackon suspendStackif wrongStack() then pass suspendStackcloseStackend suspendStackon suspendif wrongStack() then pass suspendcloseStackend suspend</script>
<background id="3068" file="background_3068.xml" name="Custom Settings" />
<background id="7188" file="background_7188.xml" name="DayRecorder" />
<background id="7841" file="background_7841.xml" name="TimeSheet" />
<background id="11033" file="background_11033.xml" name="Preferences" />
<background id="11913" file="background_11913.xml" name="Help Bg" />
<card id="11436" file="card_11436.xml" marked="false" name="" owner="11033" />
<card id="5964" file="card_5964.xml" marked="false" name="" owner="11033" />
<card id="3690" file="card_3690.xml" marked="false" name="" owner="3068" />
<card id="12508" file="card_12508.xml" marked="false" name="Help" owner="11913" />
<card id="6670" file="card_6670.xml" marked="false" name="00,11/30/92,x" owner="7841" />
<card id="6595" file="card_6595.xml" marked="false" name="Time Book 3/22/93" owner="7188" />
<card id="2296" file="card_2296.xml" marked="false" name="Time Book 3/23/93" owner="7188" />
<card id="2419" file="card_2419.xml" marked="false" name="Time Book 3/24/93" owner="7188" />
<card id="2697" file="card_2697.xml" marked="false" name="Time Book 3/25/93" owner="7188" />
<card id="4086" file="card_4086.xml" marked="false" name="Time Book 3/26/93" owner="7188" />
<card id="4960" file="card_4960.xml" marked="false" name="Time Book 3/27/93" owner="7188" />
<card id="5880" file="card_5880.xml" marked="true" name="Time Book 3/28/93" owner="7188" />
</stack>